import request from '@/utils/request'

// 查询采购入库单列表
export function listWarehousing(query) {
  return request({
    url: '/mes/wm/warehousing/list',
    method: 'get',
    params: query
  })
}

// 查询采购入库单详细
export function getWarehousing(purchaseId) {
  return request({
    url: '/mes/wm/warehousing/' + purchaseId,
    method: 'get'
  })
}

// 新增采购入库单
export function addWarehousing(data) {
  return request({
    url: '/mes/wm/warehousing',
    method: 'post',
    data: data
  })
}

// 回写采购入库单
export function PurchaseDataBack(data) {
  return request({
    url: '/mes/k3cloud/api/purseWarehousing/backPurseWarehousingData',
    method: 'post',
    data: data
  })
}

// 修改采购入库单
export function updateWarehousing(data) {
  return request({
    url: '/mes/wm/warehousing',
    method: 'put',
    data: data
  })
}

// 删除采购入库单
export function delWarehousing(purchaseId) {
  return request({
    url: '/mes/wm/warehousing/' + purchaseId,
    method: 'delete'
  })
}
